Socket
Socket
Sign inDemoInstall

arr-union

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arr-union

Returns an array of unique values using strict equality for comparisons, maintaining the same order as the provided arrays .


Version published
Weekly downloads
13M
increased by2.75%
Maintainers
1
Weekly downloads
 
Created

What is arr-union?

The arr-union npm package is designed to create an array of unique values, in order, from the provided arrays. It is particularly useful for combining arrays while removing duplicate entries efficiently.

What are arr-union's main functionalities?

Union of multiple arrays

This feature allows you to pass multiple arrays to the union function, which returns a new array that includes every unique element from the input arrays, preserving the order they appear in the input.

const union = require('arr-union');
let result = union([1, 2], [2, 3], [3, 4]);
console.log(result); // Output: [1, 2, 3, 4]

Other packages similar to arr-union

Keywords

FAQs

Package last updated on 12 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc